Skip to content

Cherry-pick patches required for fixing the incorrect input section order within an output section issue - #1333

Open
Parth (parth-07) wants to merge 4 commits into
qualcomm:release/22.xfrom
parth-07:CherryPickIncorrectSortingIssue
Open

Cherry-pick patches required for fixing the incorrect input section order within an output section issue#1333
Parth (parth-07) wants to merge 4 commits into
qualcomm:release/22.xfrom
parth-07:CherryPickIncorrectSortingIssue

Conversation

@parth-07

Copy link
Copy Markdown
Contributor

This PR cherry-pick patches that are required for fixing the incorrect input section order within an output section issue.

This commit removes the unnecessary and incorrect sorting of input
sections before the merge input sections phase when the LTO is enabled.

Resolves qualcomm#1204

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
This commit adds the LinkerWrapper APIs
sortInputSectionsForSectionMerging and
getInputSectionsForSectionMerging. These APIs make it possible for
plugins to change the order of the input sections, using a custom
compare function, in a linker script rule and consequently in the
output section.

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
This commit adds LinkerWrapper::getRuleMatchingInput API. This API
returns the input-file that is used for linker script rule-matching
for an input section.

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
This commit adds a new API,
eld::plugin::InputFile::isLTOGeneratedObject, in the plugin framework.

Signed-off-by: Parth Arora <partaror@qti.qualcomm.com>
@parth-07
Parth (parth-07) force-pushed the CherryPickIncorrectSortingIssue branch from d596423 to 3336cc9 Compare July 2, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants